﻿using Customer.Domain;
using Customer.Infrstructre.Meet;
using Customer.Read.API.Applcation.Command.MeetCommand;
using MediatR;

namespace Customer.Read.API.Applcation.CommandHandler.MeetCommandHandler
{
    /// <summary>
    /// 反填应付管理
    /// </summary>
    public class FanMeetCommandHandler:IRequestHandler<FanMeetCommand, Accounts>
    {
        private readonly IAccountsRepository _accountRep;

        public FanMeetCommandHandler(IAccountsRepository accountRep)
        {
            _accountRep = accountRep;
        }

        public async Task<Accounts> Handle(FanMeetCommand request, CancellationToken cancellationToken)
        {
            return await _accountRep.GetModelAsync(request.id);
        }
    }
}
